package com.demo2do.fms.entity.supplier.ware;

import javax.persistence.Entity;
import javax.persistence.Id;

import org.hibernate.annotations.Subselect;
import org.hibernate.annotations.Synchronize;

import com.demo2do.fms.entity.supplier.SupplierSource;

/**
 * MDM里的服务供方-仓储
 * 
 * @author Wy
 *
 */
@Entity
@Subselect("SELECT b.id AS ID, " +
                "b.code AS CODE, " +
                "b.name AS NAME, " +
                "b.name AS SHORT_NAME " +
                    "FROM TMS_TO_FMS.V_ANJI_WARE_SUPPLIER b " +
                    "WHERE b.IS_DISABLED = 0 AND b.NATURE_BUSINESS LIKE '%05%' ")
@Synchronize({"TMS_TO_FMS.V_ANJI_WARE_SUPPLIER"})
public class CommonWareSupplierSource implements SupplierSource {

    @Id
    private Long id;

    /** 服务供方代码  */
    private String code;

    /** 服务供方姓名  */
    private String name;

    /**
     * 简称
     *
     *  - 仓储供方无此字段，底层用name代替
     */
    private String shortName;

    /**
     * default Constructor
     */
    public CommonWareSupplierSource(){
        
    }
    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return code;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    
    /**
     * @return the shortName
     */
    public String getShortName() {
        return shortName;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param code the code to set
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param shortName
     */
    public void setShortName(String shortName) {
        this.shortName = shortName;
    }
    
}
